<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0060)http://115.28.87.22:8888/cooper/CooperBillListForGather.html -->
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Expires" content="0">
<title>收货 | 管理易-广告加工制作管理软件  企业版 9.28  | 易凯软件</title>
<script src="../js/minierp.js"></script>

<link rel="stylesheet" type="text/css" href="../css/base.css">
<link href="../css/Query.css" rel="stylesheet" type="text/css">
<script src="../js/QueryList.js"></script>
<script src="../js/popup_ext.js"></script>
<script language="javascript">
	function doGather(id,favCost){
		var url="../cooper/GatherBillNew.html?cooper_bill_id="+id;
		ShowIframe("收货",url,1024,500,"doGatherCallBack("+favCost+")",900,600);
	}
	function doGatherCallBack(favCost){
		if(popRetVal!=null){
			var url=getProgramLocation()+"&current_page=0";
			ShowConfirm('确认框','现在打印收货单？',340,80,"doGatherCallBackPriExt('"+url+"',"+popRetVal+","+favCost+")");
		}
	}
	function doGatherCallBackPriExt(url,id,favCost){
		if(popRetVal!=null){
			if(favCost==0){
				ShowConfirm('确认框','收货单打印金额？',340,80,"doGatherCallBackCostExt('"+url+"',"+id+")");
			}else{
				window.location=url+"&print_id="+id;
			}
		}else{
			window.location=url;
		}
	}
	function doGatherCallBackCostExt(url,id){
		var printCost="0";
		if(popRetVal!=null){
			printCost="1";
		}
		var url=url+"&print_id="+id+"&print_cost="+printCost;
		window.location=url;
	}
	function getProgramLocation(){
		var searchKey=encodeURIComponent("");
		return "../cooper/CooperBillListForGather.html?search_key="+searchKey+"&type=&ts_id=2";
	}
	function doSearch(){
		var type=document.getElementById("type").value;
		var tsId=document.getElementById("ts_id").value;
		var searchKey=encodeURIComponent(document.getElementById("search_key").value.trim());
		window.location="../cooper/CooperBillListForGather.html?search_key="+searchKey+"&type="+type+"&ts_id="+tsId;
	}
	function doGo(pageIndex){
		window.location=getProgramLocation()+"&current_page="+pageIndex;
	}
	function doJump(pageIndex){
		if(window.event.keyCode==13){
			doGo(pageIndex);
		}
	}
	function DoubleClick(it){
		var ob_arr = document.getElementsByName("query_checkbox");
		var str="";
		var favCost="0";
		if(ob_arr.length>=it.getAttribute("index")){
			str=ob_arr[it.getAttribute("index")-1].value;
			favCost = ob_arr[it.getAttribute("index")-1].getAttribute("fav_cost");
		}
		if(str==""){
			return;
		}
		doGather(str,favCost-0);
	}
	function doCancel(){
		window.close();
	}
	function doInit(){
		//Window_Onload();
		document.getElementById("search_key").focus();
	}
	function checkSearchKey(){
		if(window.event.keyCode==13){
			doSearch();
		}
	}
	function doPrint(id){
		showWin(900,600,"../cooper/CooperBillPrint.html?id="+id);
	}
	function doSms(estName,estId,billContent){
		var url="../sms/SmsSendForm.html?est_id_str="+estId;
		if(estName!=""){
			if(billContent!=null && billContent!=""){
				billContent="("+billContent+")";
			}
			var content=estName+"：订单"+billContent+"什么时候可以完工？";
			url=url+"&content="+encodeURIComponent(content);
		}
		showWin(900,500,url);
	}
	function doMutiSms(){
		var ob_arr = document.getElementsByName("query_checkbox");
		var str="";
		for (i=0;i<ob_arr.length;i++){
			if ((ob_arr[i].checked == true)){
				if(str!=""){
					str=str+";";
				}
				str = str+ob_arr[i].getAttribute("cooperator_id");
			}
		}
		if(str!=""){
			doSms("",str,"");
		}else{
			ShowAlert('提示框','请选择要发短信的外协商',200,100);
		}
	}
	function doMutiGather(){
		var ob_arr = document.getElementsByName("query_checkbox");
		var str="";
		for (i=0;i<ob_arr.length;i++){
			if ((ob_arr[i].checked == true)){
				if(str!=""){
					str=str+";";
				}
				str = str+ob_arr[i].value;
			}
		}
		if(str!=""){
			ShowConfirm('确认框','确定将选择的外协单直接设置为已收完货状态吗？',340,80,"doMutiGatherCallBack('"+str+"')");
		}else{
			ShowAlert('提示框','请选择要收货的外协单',200,100);
		}
	}
	function doMutiGatherCallBack(str){
		if(popRetVal!=null){
			var url="../cooper/GatherBillBatchNew.html?coo_id_str="+str;
			ShowIframe("收货",url,200,200,"refreshWin()");
		}
	}
	function refreshWin(){
		if(popRetVal!=null){
			window.location=getProgramLocation()+"&current_page=0";
		}
	}
	function showSmsSubscribe(){
		
		showWin(520,640,'../sms/SmsSubscribe.html');
		
		
	}
	function doPrintCallBack(){
		var printId="";
		var printCost="";
		if(printId!=null && printId!=""){
			showWin(900,600,"../cooper/GatherBillPrint.html?id="+printId+"&print_cost="+printCost);
		}
	}
	function showRelBill(id,code){
		showWin(900,600,"../cooper/CooperRelBillList.html?id="+id+"&code="+code);
	}
</script>
</head>


<body oncontextmenu="return false" onload="doInit();doPrintCallBack();" class="sheet" style="text-align:center;">
<div class="sheet-main" style="width:860px;text-align:left;margin:auto;">
  <div class="sheet-top">
    <div class="content">
      <h2>收货</h2>
      <p>根据外协单的交货日期、收货状态进行分类查询，生成收货单。<span style="color:blue">蓝色</span>表示外协单已开过收货单</p>
    </div>
  </div>
  <div class="sheet-list">
    <div class="search-business">
      <div class="content">
        <table width="748">
          <tbody>
            <tr>
				<td align="right">
				  <select name="ts_id" id="ts_id">
					<option value="0">==请选择账套==</option>
					
					<option value="1">新异</option>
					
					<option value="2" selected="">网络公司</option>
					
		  		  </select>
		  		  <select name="type" id="type">
				  	<option value="">==请选择==</option>
					<option value="UN_GATHER">全部未收货</option>
					<option value="UN_GATH_TIMEOUT">超期未收货</option>
					<option value="PART_GATH">部分收货</option>
				  </select>
		  		  
				  <input type="text" class="TextBox" id="search_key" name="search_key" onkeyup="checkSearchKey();" style="width:80px" value="" title="以外协单位名称、外协单位拼音字头、摘要、外协单号进行模糊查询">
				  <input type="button" class="buttom search-but" value=" 查 询" onclick="doSearch();" title="以外协单位名称、外协单位拼音字头、摘要、外协单号进行模糊查询">
				  <input type="button" class="buttom search-add" value=" 收 货" onclick="doMutiGather();" title="直接将已选中的外协单设置为已收完货状态">
				  <input type="button" value=" 短 信" onclick="doMutiSms();" id="sSmsButton" name="sSmsButton" class="buttom search-sms">
			  </td>
            </tr>    
           </tbody>      
        </table>
      </div>
	  
<table width="98%" border="0" cellpadding="0" cellspacing="0">
	<tbody><tr id="errorMsgTr" style="display:none">
	  <td>
	  	<div class="msg-error" id="errorMsgTd">
	  	
	  	</div>
	  </td>
	</tr>
</tbody></table>
      <div class="table-list">
        <table width="100%">      
 					<tbody><tr>
						<th width="14"><input type="checkbox" onclick="javascript:checkall(this);"></th>
						<th width="13%">单号</th>
						<th width="9%">外协日期</th>
						<th width="19%">外协单位</th>
						<th width="15%">摘要</th>
						<th width="9%">交货日期</th>
						<th width="15%">交货要求</th>
						<th width="8%">业务员</th>
						<th width="12%">操作</th>
					</tr>
				
			</tbody></table>
				
    <div class="table-bot">
    	
    	
    	 
    	  <img src="../images/but001.gif">
    	  <img src="../images/but002.gif">
    	    	
    	第 <input type="text" name="pageNumber" style="width:30px" value="0" onkeydown="javascript:doJump(this.value);" class="TextBox"> 页 
    	共0页
		
		
        <img src="../images/but003.gif">
        <img src="../images/but004.gif">
		
    </div>
      </div>     
    </div>
  </div>
</div>



</body></html>